package org.redis.cluster.registry;

import java.io.Serializable;

public class Node implements Serializable {
	
	private String path;
	private Object data;
	private NodeMode mode;
	
	public Node() {
		
	}

	public Node(String path,Object data,NodeMode mode) {
		this.path=path;
		this.data=data;
		this.mode=mode;
	}
	
	public Node(Object data) {
		this.data=data;
	}
	
	public Node(Object data,NodeMode mode) {
		this.data=data;
		this.mode=mode;
	}
	
	public NodeMode getMode() {
		return mode;
	}
	
	public String getPath() {
		return path;
	}

	public <T> T getData() {
		return (T) data;
	}
	
	public void setMode(NodeMode mode) {
		this.mode = mode;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public void setData(Object data) {
		this.data = data;
	}
}